Skip to content

Metrics explorer page design - #3348

Open
benjaminleonard wants to merge 24 commits into
oxql-pagefrom
oxql-page-design
Open

benjaminleonard wants to merge 24 commits into
oxql-pagefrom
oxql-page-design

Conversation

@benjaminleonard

Copy link
Copy Markdown
Contributor

WIP

@vercel

vercel Bot commented Aug 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
console Ready Ready Preview Sep 14, 2026 8:57pm UTC

Request Review

@david-crespo
david-crespo marked this pull request as ready for review August 25, 2026 20:48
*
* Exported for tests; use {@link oxqlAutocomplete} in the editor.
*/
export const oxqlCompletionSource =

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WOW lol

No point leaving it behind.
They're stable.
There is no such thing as "one representative query". There are three
distinct kinds of charts, to say nothing of layout!
Codemirror was putting it behind the active line, making it challenging
to see what text you selected (and impossible to tell what whitespace
you selected).
Comment thread app/pages/system/OxqlPage.tsx
This page is already tipped pretty far into "knowing everything about
backend implementation details", so I'm just grabbing an easy win here.
Safari has subpixel precision on bounding boxes, so we need slightly
more tolerance than exact matching for cursor<->placeholder comparisons.
"Within a pixel" seems fair enough to me.
return /[",\n]/.test(s) ? `"${s.replaceAll('"', '""')}"` : s
}

const tablesToCsv = (tables: OxqlTable[]): string => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think CSVs aren't worth the effort. The fields data, which is arguably the most important, is pretty useless as a single column; any reasonable CSV would have an independent column for each field instead of concatenating them together. But that isn't always doable in our case, because queries may hit multiple tables and so have different fields across all data. The answer to that is to include a column for each field of each table, and leave the values empty when your row doesn't belong to that table. And given that two tables may share a field name but not a field meaning, those names should be in some form like Field (Table Name). All of which we could do, but I say it all mostly to illustrate that the JSON is much more pliable to an end-user, and it'll be tough for us to form a CSV with much utility without knowing someone's use case for it (as opposed to them generating it from the JSON themselves)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nuke it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants